package bidsanity

class CustomerService {

    def createCustomer(Map params) { return createCustomer(params?.emailAddress, params?.password, params?.isAdmin)}
    def createCustomer(emailAddress, password, isAdmin) {
        if (isAdmin == null) { isAdmin = false }
        def c = new Customer(emailAddress: emailAddress, password: password, isAdmin: isAdmin)
        c.save(flush:true)
        return c
    }
}
